Optimización de la función Rastrigin con algoritmo genético para dos dimensiones¶

Recordemos que el valor óptimo de la función de Rastrigin es el punto (0,0) para dos dimensiones

WARNING:matplotlib.legend:No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
No description has been provided for this image

La mejor solución obtenida al terminar el algoritmo fue el vector: [-0.00078106  0.00191557] con un fitness de 0.9991517137793919

Optimización de la función Rastrigin con algoritmo genético para tres dimensiones¶

WARNING:matplotlib.legend:No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
No description has been provided for this image

La mejor solución obtenida al terminar el algoritmo fue el vector: [-4.44427058e-05 -3.73451721e-04 -1.29090947e-03] con un fitness de 0.9996414596179518

Ahora graficamos con respecto a X1 y X3:

Your browser does not support the video tag.

Graficamos con respecto a X2 y X3

Your browser does not support the video tag.